package com.puppet.building182.mapper;

import com.puppet.building182.pojo.Building;
import com.puppet.building182.pojo.Result;
import com.puppet.building182.pojo.VO.BuildingVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface BuildingMapper {

    List<Building> getAllBuildings(String search);

    Integer addBuilding(Building building);

    Integer deleteBuildingById(Integer buildingId);

    Integer deleteBuildings(@Param("buildings") List<Integer> buildings);

    Integer updateBuilding(Building building);

    Building getBuildingById(@Param("id") Integer id);

    @Select("select building_id,building_name from building_info")
    List<BuildingVo> getBuildingNameAndId();
}
